<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="海外出入库金额报表">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div translate translate-attr-title="导出"
                                yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3" is-ajax="true">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                </div>
                <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                     reset-data="reset()">
                    <div class="advance-search m-t-sm">
                        <div class="form-group clearfix" ng-if="isJCHK">
                            <label class="control-label"><span translate>公司名称</span>：</label>
                            <div multi-selector mt-datas="jckAndOverseaCompanyList" is-jck-flag = "true"
                                mt-name="companyName" mt-value="companyName" multi-value="conditionTemp.companyNames"
                                mt-placeholder="请选择公司" mt-change="onCompanySelected()"></div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>零件编号</span>：</label>
                            <textarea ng-model="conditionTemp.materialNos" class="form-control"
                                ng-change="handleTextareaData('materialNos', 'materialNoList')"
                                translate translate-attr-placeholder="逗号分隔或者换行分隔"></textarea>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>仓库编码</span>：</label>
                            <textarea ng-model="conditionTemp.warehouseCodes" class="form-control"
                                ng-change="handleTextareaData('warehouseCodes', 'warehouseCodeList')"
                                translate translate-attr-placeholder="逗号分隔或者换行分隔"></textarea>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>出入库单据号</span>：</label>
                            <textarea ng-model="conditionTemp.businessOrders" class="form-control"
                                ng-change="handleTextareaData('businessOrders', 'businessOrderList')"
                                translate translate-attr-placeholder="逗号分隔或者换行分隔"></textarea>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"><span translate>出入库开始时间</span>：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.startTime"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showStartTime = !showStartTime; showEndTime = false"
                                   ng-change="checkDate(condition, 'startTime', 'endTime')"
                                   is-open="showStartTime" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix m-b-none">
                            <label class="control-label"></label>
                            <label class="control-label wave-line">~</label>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>出入库结束时间</span>：</label>
                            <input type="text" class="form-control date-picker" ng-model="condition.endTime"
                                   datepicker-popup="{{'yyyy-MM-dd'}}"
                                   ng-click="showEndTime = !showEndTime; showStartTime = false"
                                   ng-change="checkDate(condition, 'startTime', 'endTime')"
                                   is-open="showEndTime" close-text="关闭" modal-size="small" readonly>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label"><span translate>单据类型</span>：</label>
                            <select class="form-control" ng-model="condition.recordType">
                                <option value="" translate>请选择</option>
                                <option value='1' translate>入库</option>
                                <option value='2' translate>出库</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="false"
                 has-check-col="true"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th width="60" class="text-center" translate>
                                        序号
                                    </th>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}" ng-click="selectRow($index)">
                                    <td width="60" class="text-center">
                                        <span>{{$index + 1}}</span>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                        <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                        ng-if="!!itemCol.clickFn">
                                            {{item[itemCol.dataField]}}
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>
